package singleton;

public class EagerSingleton {
    // 饿汉式单例模式
    private static EagerSingleton instance = new EagerSingleton();
    private EagerSingleton() {}

    // 提供使用方法
    public static EagerSingleton getInstance() {
        return instance;
    }
}
